package com.yj.system.utils;

import com.yj.common.constant.DataScopeConstants;
import com.yj.common.core.domain.entity.SysRole;
import com.yj.common.core.domain.entity.SysUser;
import com.yj.common.core.domain.model.LoginUser;
import com.yj.common.utils.FastUtils;
import com.yj.common.utils.SecurityUtils;
import com.yj.common.utils.StringUtils;
import com.yj.system.domain.SysRoleDept;
import com.yj.system.mapper.SysDeptMapper;
import com.yj.system.mapper.SysRoleDeptMapper;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.TreeSet;
import java.util.stream.Collectors;

/**
 * 数据权限信息
 */
public class DataScopeUtils {
    @Autowired
    private  SysRoleDeptMapper deptMapper;

    private static  DataScopeUtils dataScopeUtils;

    @PostConstruct
    public void init() {
        dataScopeUtils = this;
        dataScopeUtils.deptMapper = this.deptMapper;   // 初使化时将已静态化的testService实例化
    }

}
